home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / OpenGL / glvertexpointerext.z / glvertexpointerext
Encoding:
Text File  |  2001-04-17  |  16.8 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT - define an array of vertex data
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT( GLint _s_i_z_e,
  14.                               GLenum _t_y_p_e,
  15.                               GLsizei _s_t_r_i_d_e,
  16.                               GLsizei _c_o_u_n_t,
  17.                               const GLvoid *_p_o_i_n_t_e_r )
  18.  
  19.  
  20. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  21.      _s_i_z_e     Specifies the number of coordinates per vertex, must be 2,3, or
  22.               4.
  23.  
  24.      _t_y_p_e     Specifies the data type of each coordinate in the array.
  25.               Symbolic constants GGGGLLLL____SSSSHHHHOOOORRRRTTTT, GGGGLLLL____IIIINNNNTTTT, GGGGLLLL____FFFFLLLLOOOOAAAATTTT, or GGGGLLLL____DDDDOOOOUUUUBBBBLLLLEEEE____EEEEXXXXTTTT
  26.               are accepted.
  27.  
  28.      _s_t_r_i_d_e   Specifies the byte offset between consecutive vertexes. If
  29.               _s_t_r_i_d_e is 0 the vertexes are understood to be tightly packed in
  30.               the array.
  31.  
  32.      _c_o_u_n_t    Specifies the number of vertexes, counting from the first, that
  33.               are static.
  34.  
  35.      _p_o_i_n_t_e_r  Specifies a pointer to the first coordinate of the first vertex
  36.               in the array.
  37.  
  38. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  39.      ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT specifies the location and data format of an array of
  40.      vertex coordinates to use when rendering using the vertex array
  41.      extension.  _s_i_z_e specifies the number of coordinates per vertex and _t_y_p_e
  42.      the data type of the coordinates. _s_t_r_i_d_e gives the byte stride from one
  43.      vertex to the next allowing vertexes and attributes to be packed into a
  44.      single array or stored in separate arrays.  (Single-array storage may be
  45.      more efficient on some implementations.)  _c_o_u_n_t indicates the number of
  46.      array elements (counting from the first) that are static. Static elements
  47.      may be modified by the application, but once they are modified, the
  48.      application must explicitly respecify the array before using it for any
  49.      rendering. When a vertex array is specified, _s_i_z_e, _t_y_p_e, _s_t_r_i_d_e, _c_o_u_n_t,
  50.      and _p_o_i_n_t_e_r are saved as client-side state, and static array elements may
  51.      be cached by the implementation.
  52.  
  53.      The vertex array is enabled and disabled using ggggllllEEEEnnnnaaaabbbblllleeee and ggggllllDDDDiiiissssaaaabbbblllleeee
  54.      with the argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT. If enabled, the vertex array is
  55.      used when ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssssEEEEXXXXTTTT or ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnnttttEEEEXXXXTTTT is called.
  56.  
  57.      Use ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssssEEEEXXXXTTTT to define a sequence of primitives (all of the same
  58.      type) from pre-specified vertex and vertex attribute arrays.  Use
  59.      ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnnttttEEEEXXXXTTTT to specify primitives by indexing vertexes and vertex
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      attributes.
  75.  
  76. NNNNOOOOTTTTEEEESSSS
  77.      Non-static array elements are not accessed until ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnnttttEEEEXXXXTTTT or
  78.      ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssssEEEEXXXXTTTT is executed.
  79.  
  80.      By default the vertex array is disabled and it won't be accessed when
  81.      ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnnttttEEEEXXXXTTTT or ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssssEEEEXXXXTTTT is called.
  82.  
  83.  
  84.      Although it is not an error to call ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT between the
  85.      execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd, the
  86.      results are undefined.
  87.  
  88.  
  89.      ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT will typically be implemented on the client side with
  90.      no protocol.
  91.  
  92.  
  93.      Since the vertex array parameters are client side state, they are not
  94.      saved or restored by ggggllllPPPPuuuusssshhhhAAAAttttttttrrrriiiibbbb and ggggllllPPPPooooppppAAAAttttttttrrrriiiibbbb.
  95.  
  96.  
  97.      ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT commands are not entered into display lists.
  98.  
  99.  
  100.      ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT is part of the EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy extension, not part of
  101.      the core GL command set. If GGGGLLLL____EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy is included in the string
  102.      returned by ggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg, when called with argument GGGGLLLL____EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS,
  103.      extension EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy is supported.
  104.  
  105.  
  106. EEEERRRRRRRROOOORRRRSSSS
  107.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_i_z_e is not 2, 3, or 4.
  108.  
  109.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is is not an accepted value.
  110.  
  111.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_t_r_i_d_e or _c_o_u_n_t is negative.
  112.  
  113. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  114.      ggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT
  115.      ggggllllGGGGeeeetttt with argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____SSSSIIIIZZZZEEEE____EEEEXXXXTTTT
  116.      ggggllllGGGGeeeetttt with argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____TTTTYYYYPPPPEEEE____EEEEXXXXTTTT
  117.      ggggllllGGGGeeeetttt with argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____SSSSTTTTRRRRIIIIDDDDEEEE____EEEEXXXXTTTT
  118.      ggggllllGGGGeeeetttt with argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____CCCCOOOOUUUUNNNNTTTT____EEEEXXXXTTTT
  119.      ggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvvEEEEXXXXTTTT with argument GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____PPPPOOOOIIIINNNNTTTTEEEERRRR____EEEEXXXXTTTT
  120.  
  121.  
  122. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  123.      On RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems, do not enable or
  124.      disable GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY,
  125.      GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT,
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))
  137.  
  138.  
  139.  
  140.      GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY,GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY,
  141.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY or GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT
  142.      between a call to ggggllllNNNNeeeewwwwLLLLiiiisssstttt and the corresponding call to ggggllllEEEEnnnnddddLLLLiiiisssstttt.
  143.      Instead, enable or disable before the call to ggggllllNNNNeeeewwwwLLLLiiiisssstttt.
  144.  
  145.      On IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems it is particularly important to minimize the
  146.      amount of data transferred from the application to the graphics pipe,
  147.      since the host-to-pipe bandwidth limit can cause a performance
  148.      bottleneck.  One way to reduce the amount of data transferred per vertex
  149.      is to use properly-aligned byte and short data types whenever possible.
  150.      Accordingly, the EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy extension on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems
  151.      has been optimized for vertex information packed into the following data
  152.      structures.  (Note: v represents vertex coordinates, c represents color
  153.      components, n represents normal coordinates, and t represents texture
  154.      coordinates.  Normals must have unit length.)
  155.  
  156.           struct {GLfloat v[3];}
  157.           struct {GLubyte c[4]; GLfloat v[3];}
  158.           struct {GLshort n[3]; GLfloat v[3];}
  159.           struct {GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  160.           struct {GLshort t[2]; GLfloat v[3];}
  161.           struct {GLshort t[2]; GLubyte c[4]; GLfloat v[3];}
  162.           struct {GLshort t[2]; GLshort n[3]; GLfloat v[3];}
  163.           struct {GLshort t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  164.           struct {GLfloat t[2]; GLfloat v[3];}
  165.           struct {GLfloat t[2]; GLubyte c[4]; GLfloat v[3];}
  166.           struct {GLfloat t[2]; GLshort n[3]; GLfloat v[3];}
  167.           struct {GLfloat t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  168.  
  169.      Application-specific fields may be added to these structures, provided
  170.      that all the fields described above retain their relative order and word
  171.      alignment.
  172.  
  173.      An additional constraint applies when ggggllllTTTTeeeexxxxGGGGeeeennnn is being used.  The
  174.      implementation normally generates all four texture coordinates in
  175.      parallel, and must take special action to generate just a subset of the
  176.      four coordinates.  Therefore performance is best when none of the texture
  177.      coordinates are being generated, or when all of them are being generated.
  178.      For example, when using 2D texturing (generating s and t coordinates) it
  179.      will be faster to enable texture coordinate generation for the r and q
  180.      coordinates as well as s and t.  Choose a texture generation mode of
  181.      GGGGLLLL____OOOOBBBBJJJJEEEECCCCTTTT____LLLLIIIINNNNEEEEAAAARRRR and use the plane equations (0,0,0,0) and (0,0,0,1) for
  182.      r and q, respectively.
  183.  
  184.      Using these structures on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems can improve performance
  185.      considerably, compared to structures in which all values are single-
  186.      precision floating point.
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))         OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee         ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT((((3333GGGG))))
  203.  
  204.  
  205.  
  206. SEE ALSO
  207.      ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnnttttEEEEXXXXTTTT, ggggllllCCCCoooolllloooorrrrPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT, ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssssEEEEXXXXTTTT,
  208.      ggggllllEEEEddddggggeeeeFFFFllllaaaaggggPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT, ggggllllEEEEnnnnaaaabbbblllleeee, ggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvvEEEEXXXXTTTT, ggggllllIIIInnnnddddeeeexxxxPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT,
  209.      ggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT, ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrrEEEEXXXXTTTT
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.